package com.entity;


public class Person {

    private String name; //姓名
    private String gender; //性别
    private String birthday; //生日
    private String address; //住址

    public Person() {
        System.out.println("一个人从世界上诞生了....");
    }

    public Person(String name, String gender, String birthday, String address) {
        this();
        this.name = name;
        this.gender = gender;
        this.birthday = birthday;
        this.address = address;
    }

    public void initPerson(){
        System.out.println("执行了initPerson()....");
    }

    public void destroyPerson(){
        System.out.println("执行了destroyPerson()....");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        System.out.println("执行了setName(String)");
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        System.out.println("执行了setGender(String)");
        this.gender = gender;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        System.out.println("执行了setBirthday(String)");
        this.birthday = birthday;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        System.out.println("执行了setAddress(String)");
        this.address = address;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", birthday='" + birthday + '\'' +
                ", address='" + address + '\'' +
                '}';
    }
}
